﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LoLScrape
{
    /// <summary>
    /// Riot Configuration File Structure
    /// </summary>
    namespace Inibin
    {
        struct InibinHeader
        {
            public Int16 intVersion;
            public Int64 intStringOffset;
            public Int64 intStringLength;
            public Int16 intSegmentFlags;
        } //end InibinHeader

        /// <summary>
        /// Object which represents the 1 Int32 values of segment 1 key values
        /// </summary>
        public class Segment01Item
        {
            public Int32 intValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += intValue.ToString();
                return strValue;
            } //end ToString

        } //end Segment01Item

        /// <summary>
        /// Object which represents the 1 Single prec value of segment 2 key values
        /// </summary>
        public class Segment02Item
        {
            public Single fltValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += fltValue.ToString();
                return strValue;
            } //end ToString

        } //end Segment02Item

        /// <summary>
        /// Object which represents the 1 Int8 value (divided by 10) of segment 3 key values
        /// </summary>
        public class Segment03Item
        {
            public Int16 intValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += ((Single)intValue / 10.0);
                return strValue;
            } //end ToString

        } //end Segment03Item

        /// <summary>
        /// Object which represents the 1 Int16 value of segment 4 key values
        /// </summary>
        public class Segment04Item
        {
            public Int16 intValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += intValue.ToString();
                return strValue;
            } //end ToString

        } //end Segment04Item

        /// <summary>
        /// Object which represents the 1 Int8 value for segment 5 key values
        /// </summary>
        public class Segment05Item
        {
            public Int16 intValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += intValue.ToString();
                return strValue;
            } //end ToString

        } //end Segment05Item

        /// <summary>
        /// Object which represents the 1 Boolean value for segment 6 key values
        /// </summary>
        public class Segment06Item
        {
            public Boolean boolValue { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += boolValue.ToString();
                return strValue;
            } //end ToString

        } //end Segment06Item

        /// <summary>
        /// Object which represents the 3 Int8 values of segment 7 key values
        /// </summary>
        public class Segment07Item
        {
            //BGR (RGB) values...?
            public UInt16 R { get; set; }
            public UInt16 G { get; set; }
            public UInt16 B { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "R" + R.ToString() + " ";
                strValue += "G" + G.ToString() + " ";
                strValue += "B" + B.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment07Item

        /// <summary>
        /// Object which represents the 3x Single Prec Float values of segment 8 key values
        /// </summary>
        public class Segment08Item
        {
            //either XYZ coordinates or RGB shader vals....
            public Single R { get; set; }
            public Single G { get; set; }
            public Single B { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "R" + R.ToString() + " ";
                strValue += "G" + G.ToString() + " ";
                strValue += "B" + B.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment08Item

        /// <summary>
        /// Object which represents the 2x Int8 values of segment 9 key values
        /// </summary>
        public class Segment09Item
        {
            public UInt16 X { get; set; }
            public UInt16 Y { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "X" + X.ToString() + " ";
                strValue += "Y" + Y.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment09Item

        /// <summary>
        /// Object which represents the 2x Single Prec Float values of segment 10 key values
        /// </summary>
        public class Segment10Item
        {
            public Single X { get; set; }
            public Single Y { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "X" + X.ToString() + " ";
                strValue += "Y" + Y.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment10Item

        /// <summary>
        /// Object which represents the 4 Int8 values of segment 11 key values
        /// </summary>
        public class Segment11Item
        {
            //BGR (RGB) values...?
            public UInt16 R { get; set; }
            public UInt16 G { get; set; }
            public UInt16 B { get; set; }
            public UInt16 A { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "R" + R.ToString() + " ";
                strValue += "G" + G.ToString() + " ";
                strValue += "B" + B.ToString() + " ";
                strValue += "A" + A.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment11Item

        /// <summary>
        /// Object which represents the 4 float values of segment 12 key values
        /// </summary>
        public class Segment12Item
        {
            public Single R { get; set; }
            public Single G { get; set; }
            public Single B { get; set; }
            public Single A { get; set; }

            public override string ToString()
            {
                string strValue = "";
                strValue += "[ ";
                strValue += "R" + R.ToString() + " ";
                strValue += "G" + G.ToString() + " ";
                strValue += "B" + B.ToString() + " ";
                strValue += "A" + A.ToString() + " ";
                strValue += "]";
                return strValue;
            } //end ToString

        } //end Segment12Item

    } //end Inibin

} //end LoLScape
